package com.hongyue.dey09;

import com.hongyue.dey08.Student;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class Demo {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("dey11/src/com/hongyue/dey08/aaa.txt"));
        ArrayList<Student> arr = new ArrayList<>();
        for (String i; (i = br.readLine()) != null; ) {
            String[] split = i.split(",");
            arr.add(new Student(split[0], split[1], split[2], split[3]));
        }
        br.close();
        for (Student s : arr) {
            System.out.println(s);
        }
    }
}
